package com.wangjw.tuling.zookeeper.own;

import org.apache.zookeeper.KeeperException;

/**
 * Created by wangjianwen on 2018/12/1.
 */
public class ZooKeeperWatchTester {

    public static void main(String[] args) throws KeeperException, InterruptedException {
        ZookeeperWatch zookeeperWatch = new ZookeeperWatch();

        zookeeperWatch.getData("/wangxm", true);
        Thread.sleep(10000);

        zookeeperWatch.setData("/wangxm", "Go");
        Thread.sleep(10000);

        zookeeperWatch.delete("/wangxm");
        Thread.sleep(30000);
    }
}
